package com.kingdee.eas.custom.basedata.client;

import java.awt.Dialog;
import java.awt.Frame;

import com.kingdee.bos.BOSException;
import com.kingdee.bos.ctrl.extendcontrols.KDCommonPromptDialog;
import com.kingdee.bos.ui.face.IUIFactory;
import com.kingdee.bos.ui.face.IUIObject;
import com.kingdee.bos.ui.face.IUIWindow;
import com.kingdee.bos.ui.face.UIFactory;
import com.kingdee.eas.common.client.UIContext;
import com.kingdee.eas.util.client.ExceptionHandler;

public class GeneraProjectMultiListUI extends KDCommonPromptDialog{
	protected IUIWindow f7UI;
	/*    */   private F7ProjectMultiListUI userUI;
	/* 26 */   private boolean isMultiSelect = true;
	/* 27 */   UIContext uiContext = new UIContext(this);
			
	/*    */
	/*    */   public GeneraProjectMultiListUI()
	/*    */   {
	/* 31 */     this.uiContext.put("Owner", this);
	/*    */   }
	/*    */
	/*    */   public GeneraProjectMultiListUI(Frame owner)
	/*    */   {
	/* 36 */     super(owner);
	/* 37 */     this.uiContext.put("Owner", this);
	/*    */   }
	/*    */
	/*    */   public GeneraProjectMultiListUI(IUIObject owner)
	/*    */   {
	/* 42 */     this.uiContext.put("Owner", this);
	/*    */   }
	
			  public GeneraProjectMultiListUI(IUIObject owner,Object dat)
			   {
			     this.uiContext.put("Owner", this);
			     
			     this.uiContext.put("da",dat);
			   }
	/*    */
	/*    */   public GeneraProjectMultiListUI(Dialog owner)
	/*    */   {
	/* 47 */     super(owner);
	/* 48 */     this.uiContext.put("Owner", this);
	/*    */   }
	/*    */
	/*    */   public Object getData()
	/*    */   {
//	/* 53 */     if (this.isMultiSelect)
//	/*    */     {
	/* 55 */       return this.userUI.datas.toArray();
	/*    */
//	/*    */     }
	/*    */ 
//	/* 59 */     Object[] data = new Object[1];
//	/* 60 */     data[0] = this.userUI.data;
//	/* 61 */     return data;
	/*    */   }
	/*    */
	/*    */
	/*    */   public void show()
	/*    */   {
	/* 67 */     IUIFactory uiFactory = null;
	/*    */     try
	/*    */     {
	/* 70 */       uiFactory = UIFactory.createUIFactory("com.kingdee.eas.base.uiframe.client.UIModelDialogFactory");
	/* 71 */       this.uiContext.put("isMultiSelect", new Boolean(this.isMultiSelect));
	               
	               
	/* 72 */       this.f7UI = uiFactory.create(F7ProjectMultiListUI.class.getName(), this.uiContext);
	/* 73 */       this.userUI = ((F7ProjectMultiListUI)this.f7UI.getUIObject());
	/* 74 */       this.f7UI.show();
	/*    */     }
	/*    */     catch (BOSException ex)
	/*    */     {
	/* 78 */       ExceptionHandler.handle(ex);
	/*    */     }
	/*    */   }
	/*    */
	/*    */   public boolean isCanceled()
	/*    */   {
	/* 84 */     return this.userUI.isCanceled;
	/*    */   }
	/*    */
	/*    */   public boolean isMultiSelect()
	/*    */   {
	/* 89 */     return this.isMultiSelect;
	/*    */   }
	/*    */
	/*    */   public void setMultiSelect(boolean multiSelect)
	/*    */   {
	/* 94 */     this.isMultiSelect = multiSelect;
	/*    */   }
}
